<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/18 0018
 * Time: 上午 8:58
 */

namespace app\sports_admin\vaildate;

class Suggestion extends Base
{
    protected $rule = [
        'id'=>'require|isPositiveInteger',
    ];

    protected $message = [
        'id'=>'编号必须为整数',
    ];
    //添加
    public function insert()
    {
        $rule = [
            'title'=>'require',
            'textarea'=>'require',
            'content'=>'require',
            'typeId'=>'require|integer',
            'images'=>'require',
        ];
        $msg = [
            'title'=>'标题不能为空',
            'textarea'=>'简介不能为空',
            'content'=>'内容不能为空',
            'typeId'=>'类别格式错误',
            'images'=>'请上传图片',
        ];
        self::goCheck($rule,$msg);
    }
}